<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>HTTP-FLV播放器</title>
    <script src="https://cdn.jsdelivr.net/npm/flv.js@1.6.2/dist/flv.min.js"></script>
</head>
<body>
    <video id="videoElement" controls width="800" height="500"></video>
    <script>
        const video = document.getElementById('videoElement');
        let flvPlayer = null;
        if (flvjs.isSupported()) {
            flvPlayer = flvjs.createPlayer({
                type: 'flv',
                url: 'https://mister-ben.github.io/videojs-flvjs/bbb.flv',
                isLive: true
            });
            flvPlayer.attachMediaElement(video);
            flvPlayer.load();
            flvPlayer.on(flvjs.Events.LOADING_COMPLETE, () => {
            });
            flvPlayer.on(flvjs.Events.ERROR, (errType, errDetail) => {
            });
            video.play().catch(e => {
            });
        }
    </script>
</body>
</html>